clear all
set more off
set maxvar 32000
set matsize 11000
*************************************************************************************************
*set scheme aspen, perm
grstyle init
grstyle set plain, horizontal grid

use "$folder/data/data_ready.dta", clear
cd "$folder/output/figures"
local x=18

xtset state year, yearly delta(2)

label variable growth_gsp "Growth GSP"
label variable log_real1gsppc "Log Real Income per capita"
label variable growth_pc "Growth Real Income per capita"
label variable lestab_D "Growth Number Estabilishments"
label variable lprofits_mill_D "Growth State Profits, Millions"
label variable lcbp_emp_D "Growth Employment"

label variable log_provisions_18 "Legislative Detail"
label variable log_cond_list_prov_18 "Contingent Provisions" 
label variable log_non_cond_list_prov_18 "Non-Contingent Provisions" 
label variable shock_prov18 "Shock to Legislative Detail"
label variable shock_cond_list_prov18 "Shock to Contingencies"
label variable shock_non_cond_list_prov18 "Shock to Non-Contingencies"

label variable gsp_initial "Initial Gross State Product"
label variable growth_initial "Initial GSP Growth"
label variable gsp_pc_initial "Initial GSP per capita"
label variable lestab_D "Growth Number Establishments"
label variable lprofits_mill_D "Growth State Profits, Millions"
label variable lcbp_emp_D "Growth Employment"

*******************
* DESCRIPTIVE
*******************

**** Figure - Scatterplots provisions gsp ***
scatter log_gsp_a log_provisions_`x' if year == 1966 & state_abbrev!="AK" || lfit log_gsp_a log_provisions_`x' if year == 1966 & state_abbrev!="AK", xtitle(Log Provisions) xscale(range(6.5 11)) yscale(range(14 22)) ylabel(14(2)22) ytitle(Log GSP) mlabel(state_abbrev) xsize(7) text(20 7 "Slope = .24***" "(s.e. = .09)", place(se) just(left) margin(l+4 t+1 b+1) width(25) ) 
graph export  Figure_1_scatt_gsp_1966.pdf, replace

scatter log_gsp_a log_provisions_`x' if year == 2012 & state_abbrev!="AK" || lfit log_gsp_a log_provisions_`x' if year == 2012 & state_abbrev!="AK", xtitle(Log Provisions) xscale(range(6.5 11)) yscale(range(14 22)) ylabel(14(2)22) ytitle(Log GSP) mlabel(state_abbrev) xsize(7) text(20 7 "Slope = .44***" "(s.e. = .10)", place(se) just(left) margin(l+4 t+1 b+1) width(25) ) 
graph export  Figure_1_scatt_gsp_2012.pdf, replace